/**
 * @param {number} x
 * @param {number} y
 * @return {number}
 */
 var hammingDistance = function(x, y) {
    let s = x ^ y, res = 0;
    while (s != 0) {
        res += s & 1;
        s >>>= 1;
    }
    return res;
};